<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/common/base.jsp"%>

<% 
  //实例化AreaDao
  FamilyDao familyDao=new FamilyDao();
  List<Family> familyList=familyDao.findFamilyList();
   System.out.println("familyList=="+familyList);

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">

<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<script type="text/javascript" src="js/IDcard.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#add_btn").bind("click", function() {
			$('form').submit();
		});
	});
</script>
<%
	String userid = session.getAttribute("userid").toString();
%>
</head>

<body>

	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>增加家庭档案信息</strong>
		</div>
		<div class="body-content">
			<form id="form-add" method="post" class="form-x"
				action="<%=path%>/biz/Family_memberServlet?m=add">
				<div class="form-group">
					<div class="label">
						<label>所属家庭：</label>
					</div>
					<div class="field">
					<input type="text" class="input w50" value="" name="familycode" list="family" id=""/>
						<datalist id="family" class="selectDate" aria-invalid="false"> 
							<%
						  for(Family m:familyList){ 
						
						  %>
							<option value="<%=m.getFamilycode()%>"><%=m.getFamilyname() %></option>
							<%} %>

						</datalist >


						<div class="tips"></div>
					</div>

				 </div>
				 <!--
				<div class="form-group">
					<div class="label">
						<label>医疗证卡号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="medicalCard"
							data-validate="required:请输入家庭档案信息" />
						<div class="tips"></div>
					</div>
				</div> -->
				
				<div class="form-group">
					<div class="label">
						<label>姓名：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="membername"
							data-validate="required:请输入户主名称" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>身份证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="IDcard" id="IDcard"
							data-validate="required:请输入身份证号" onblur="getInfo()"/>
						<div class="tips"></div>
					</div>
				</div>
				
 			<div class="form-group">
					<div class="label">
						<label>性别：</label>
					</div>
					<div class="field">
				<!-- 	<select name="sex" id="sex" class="input w50"> 
						<option value="男">男</option> 
						<option value="女">女</option> 
					</select>  -->
						 <input type="text" class="input w50" value="" name="sex" id="sex" 
						 	data-validate="required:请输入身份证号"/> 
						<div class="tips"></div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>出生日期：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="birthday" id="birthday"
							data-validate="required:请输入户属性"/>
						<div class="tips"></div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>年龄：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="age" id="age"
							data-validate="required:请输入户属性"/>
						<div class="tips"></div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>人员属性：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="state"
							data-validate="required:请输入具体地址" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>与 户 主 关系：</label>
					</div>
					<div class="field">
					<select name="relation" class="input w50"> 
						<option value="夫妻">夫妻</option> 
						<option value="女儿">女儿</option> 
						<option value="儿子">儿子</option> 
					</select> 
						<!-- <input type="text" class="input w50" value="" name="relation"
							data-validate="required:请输入家庭人口数" /> -->
						<div class="tips"></div>
					</div>
				</div>
<!-- 
				<div class="form-group">
					<div class="label">
						<label>组编号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="familyteam"
							data-validate="required:请输入组编号" />
						<div class="tips"></div>
					</div>
				</div>
 -->

				
				<div class="form-group">
					<div class="label">
						<label>电话：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="tel"
							data-validate="required:请输入具体地址" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>健康状态：</label>
					</div>
					<div class="field">
					<select name="health" class="input w50"> 
						<option value="健康">健康</option> 
						<option value="不健康">不健康</option> 
					</select> 
						<!-- <input type="text" class="input w50" value="" name="health"
							data-validate="required:请输入家庭人口数" /> -->
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>民族：</label>
					</div>
					<div class="field">
					
					<input type="text" class="input w50" value="" name="nation" list="familynation" id=""/>
						<datalist id="familynation" class="selectDate" aria-invalid="false"> 
							<option value="汉族">汉族</option> 
							<option value="壮族">壮族</option> 
						</datalist >
					
						<%-- <input type="text" class="input w50" value="" name="nation"
							data-validate="required:请输入组编号" /> --%>
						<div class="tips"></div>
					</div>
				</div>

				
				
				<div class="form-group">
					<div class="label">
						<label>是否农村户口：</label>
					</div>
					<div class="field">
					<select name="IScountryside" class="input w50"> 
						<option value="农村">农村</option> 
						<option value="城镇">城镇</option> 
					</select> 
						<!-- <input type="text" class="input w50" value="" name="IScountryside"
							data-validate="required:请输入户属性" /> -->
						<div class="tips"></div>
					</div>
				</div>


				<div class="form-group">
					<div class="label">
						<label>职业：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="occupation" list="familyoccupation"/>
						<datalist id="familyoccupation" class="selectDate" aria-invalid="false"> 
							<option value="务农">务农</option> 
							<option value="外出打工">外出打工</option> 
						</datalist >
						<div class="tips"></div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>地址：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="address"
							data-validate="required:请输入户属性" />
						<div class="tips"></div>
					</div>
				</div>
				
				<!-- <div class="form-group">
					<div class="label">
						<label>农合证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="join_nh_code"
							data-validate="required:请输入户属性" />
						<div class="tips"></div>
					</div>
				</div> -->
				
				<div class="form-group">
					<div class="label">
						<label>登记员：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=userid %>" name="userid"
							data-validate="required:请输入登记员" readonly="readonly"/>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o" type="button">提交</button>
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>

</body>
</html>
